package com.ju.demo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ju.demo.entity.Clientele;
import com.ju.demo.mapper.ClienteleMapper;
import com.ju.demo.service.ClienteleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ClienteleServiceImpl implements ClienteleService {

    @Autowired
    private ClienteleMapper clienteleMapper;

    @Override
    public Clientele findClienteleByID(Integer id) {
        QueryWrapper<Clientele> clienteleQueryWrapper = new QueryWrapper<>();
        clienteleQueryWrapper.eq("clientele_id",id);
        Clientele clientele = clienteleMapper.selectOne(clienteleQueryWrapper);
        return clientele;
    }
}
